{% for datalog in datalog_list %}
    <tr class="row m-0">
        <td class="col-2">{{ datalog.station }}</td>
        <td class="col-2">{{ datalog.online_interrupt_start | date:'Y年m月d日 H:i:s' }}</td>
        <td class="col-2">{{ datalog.online_interrupt_end | date:'Y年m月d日 H:i:s' }}</td>
        <td class="col-2">{{ datalog.online_interrupt_duration | floatformat:"2" }}</td>
        <td class="col-2">{{ datalog.online_continuous_rate | floatformat:"4" }}</td>
        <td class="col-2">
            <div class="btn-group">
                {% if datalog.online_continuous_rate == 100.0 %}
                    <button type="button" class="btn btn-sm btn-success" disabled="disabled">
                        正常无断记
                    </button>
                {% else %}
                    <button type="button" class="btn btn-sm btn-primary js-add-station-datalog-default"
                            data-url="{% url 'update_station_datalog' pk=datalog.pk is_auto=1 %}">
                        正常无断记
                    </button>
                {% endif %}
                <button type="button" class="btn btn-sm btn-outline-primary js-add-station-datalog"
                        data-url="{% url 'update_station_datalog' pk=datalog.pk is_auto=0 %}">
                    修改日志
                </button>
            </div>
        </td>
    </tr>
{% empty %}
    {% for station in station_list %}
        <tr class="row m-0">
            <td class="col-2">{{ station }}</td>
            <td class="col-2"></td>
            <td class="col-2"></td>
            <td class="col-2"></td>
            <td class="col-2"></td>
            <td class="col-2">
                <div class="btn-group">
                    {% if schedule.actual_duty_person is None %}
                        <button type="button" class="btn btn-sm btn-secondary" disabled="disabled">
                            正常无断记
                        </button>
                        <button type="button" class="btn btn-sm btn-outline-secondary" disabled="disabled">
                            添加详情
                        </button>
                    {% else %}
                        <button type="button" class="btn btn-sm btn-primary js-add-station-datalog-default"
                                data-url="{% url 'add_station_datalog' station_pk=station.pk year=day.year month=day.month day=day.day is_auto=1 %}">
                            正常无断记
                        </button>
                        <button type="button" class="btn btn-sm btn-outline-primary js-add-station-datalog"
                                data-url="{% url 'add_station_datalog' station_pk=station.pk year=day.year month=day.month day=day.day is_auto=0 %}">
                            添加详情
                        </button>
                    {% endif %}
                </div>
            </td>
        </tr>
    {% endfor %}
{% endfor %}
